package com.cmes.web.trace;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;

/**
 * TraceId
 *
 * @author Bruce.Gong
 * @since 1.0.0-SNAPSHOT
 */
public class TraceAutoConfiguration {

    @Bean
    public FilterRegistrationBean<TraceFilter> traceFilterRegistrationBean() {
        FilterRegistrationBean<TraceFilter> filterRegistrationBean = new FilterRegistrationBean<>();
        filterRegistrationBean.setFilter(new TraceFilter());
        filterRegistrationBean.addUrlPatterns("/*");
        return filterRegistrationBean;
    }

}
